home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / CALib & You… / Source / CALib / Implementation / UI / CAUndo.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-07  |  1.3 KB  |  59 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CAUndo.cpp
  3.  
  4.     Contains:    Container Application Library source - Undo interface
  5.  
  6.     Written by:    Steve Foley, Greg Ames, David Nelson
  7.  
  8.     Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <5>     4/14/95    SJF        Implemented ClearUndo
  13.          <3+>     4/13/95    SJF        Implement ClearUndo
  14.          <3+>     2/28/95    SJF        Add debug stuff to API calls
  15.          <3>     2/13/95    SJF        Interim checkin to update project database
  16.          <2)    12/15/94    SJF        change somGetGlobalEnvironment to _gpProxyShell->GetGlobalEnvironment
  17.          <1>    10/30/94    GCA,DHN    All mods to make project compile with no
  18.                                      errors under OpenDoc b1 (with SOM).
  19.          <0>    10/16/94    SJF        first written
  20.          
  21.     To Do:
  22.         implement
  23. */
  24.  
  25. #ifndef _CASESSN_
  26. #include "CASessn.h"
  27. #endif
  28.  
  29. #ifndef _CAERROR_
  30. #include "CAError.h"
  31. #endif
  32.  
  33. #ifndef SOM_ODUndo_xh
  34. #include <Undo.xh>
  35. #endif
  36.  
  37. #pragma segment CALib
  38.  
  39.  
  40. //-------------------------------------------------------------------------
  41. // Undo ***
  42. //-------------------------------------------------------------------------
  43.  
  44. pascal    void        CAClearUndo( void )
  45. {
  46.     Environment*    ev        = gCASession->GetEV();
  47.        ODUndo*            undo    = gCASession->GetODSession()->GetUndo(ev);
  48.  
  49.     CA_TRY
  50.            undo->ClearActionHistory( ev, kODDontRespectMarks );
  51.        CA_CATCH_ALL
  52.        CA_ENDTRY
  53.        
  54. }
  55.  
  56.  
  57.  
  58.  
  59.